package utilities.event;

import java.util.Calendar;

import org.hibernate.Session;

import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;

import utilities.Updatable;
import utilities.utilities_components.SumUp;

public class TICListener implements EventListener{
	private SumUp controller;
	private Updatable updateItem;
	
	public TICListener( SumUp controller, Updatable updateItem ){
		this.controller = controller;
		this.updateItem = updateItem;
	}
	
	public void onEvent( Event event ){
		Calendar calendar = controller.getDate();
		
		updateItem.update( getData( calendar.get( Calendar.YEAR ), calendar.get( Calendar.MONTH ) ) );
	}
	
	//只有两个子List第一个子List的第一项为字符串"房费收入",第二项为满足条件的房费
	//第二个子List的第一项为字符串"其它收入",第二项为满足条件的其它费用
	//条件:起始日期begin截止日期end间的费用
	private List getData( int year, int month, Session session ){
		
	}
}
